package org.particlethink.service.impl;

import org.particlethink.auth.DefaultUser;
import org.particlethink.customer.Consumer;
import org.particlethink.service.ConsumerService;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;

@Service
public class ConsumerServiceImpl implements ConsumerService {
    public Consumer buildConsumer(Integer userId) {
        // todo 构建用户信息
        return (DefaultUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
